---
id: 5f07be6ef7412fbad0c5626b
title: Hatua ya 16
challengeType: 0
dashedName: step-16
---

# --description--

Kabla ya kuongeza maudhui yoyote mapya, unapaswa kutumia kipengele cha `section` ili kutenganisha maudhui ya picha za paka na maudhui ya baadaye.

The `section` element is used to define sections in a document, such as chapters, headers, footers, or any other sections of the document. It is a semantic element that helps with SEO and accessibility.

```html
<section>
  <h2>Section Title</h2>
  <p>Section content...</p>
</section>
```

Chukua vipengele vyako vya `h2`, maoni, `p` na tia nanga (`a`) na uviweke kwenye kipengele cha `section`.

# --hints--

Kipengee chako cha `section` kinapaswa kuwa na tagi ya ufunguzi. Tagi za ufunguzi zina sintaksia ifuatayo: `<elementName>`.

```js
assert(document.querySelector('section'));
```

Kipengee chako cha `section` kinapaswa kuwa na tagi ya kufunga. Tagi za kufunga zina `/` mara baada ya herufi ya `<`.

```js
assert(code.match(/<\/section\s*>/i));
```

Kipengele kizima cha `section` kinafaa kuwa ndani ya tagi za ufunguzi na za kufunga za kipengele cha `main`.

```js
assert(document.querySelector('section').parentNode.nodeName === 'MAIN');
```

Kipengele kilichopo cha `h2`, maoni, `p`, na nanga (`a`) kinapaswa kuwa kati ya tagi za kufungua na kufunga za kipengele cha `section`.

```js
const childrenOfSection = [...document.querySelector('section').childNodes];
const foundElements = childrenOfSection.filter((child) => {
  return ['H2', 'A', 'P'].includes(child.nodeName);
});
assert(foundElements.length === 3);
```

Kipengee chako cha `h1` hakipaswi kuwekwa kwenye kipengee chako cha `section`.

```js
const childrenOfSection = [...document.querySelector('section').childNodes];
const includesH1 = childrenOfSection.some((child) => child.nodeName === 'H1');
assert.isFalse(includesH1);
```

# --seed--

## --seed-contents--

```html
<html>
  <body>
    --fcc-editable-region--
    <main>
      <h1>CatPhotoApp</h1>

      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
      <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

    </main>
--fcc-editable-region--
  </body>
</html>
```

